Skip to content

Conversation

@swallez
Copy link
Contributor

@swallez swallez commented May 23, 2023

When an error response cannot be parsed, make sure we throw a TransportException that wraps the original response for further inspection. This is useful when a request fails because a proxy rejected the response and returns its own error response which can be anything.

Also add status code to TransportException.

Fixes #563

@swallez swallez merged commit 9246eab into main May 23, 2023
@swallez swallez deleted the fix-non-json-error-parsing branch May 23, 2023 12:53
swallez added a commit that referenced this pull request May 23, 2023
) (#580)

Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
swallez added a commit that referenced this pull request May 23, 2023
) (#581)

Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

401 Unauthorized exception marked as JsonParsingException

1 participant